import 'package:flutter/material.dart';

class ConstrainedBoxDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        home: Scaffold(
            appBar: AppBar(title: const Text('AspectRatio Sample')),
            body: Center(
              child: ConstrainedBox(
                  constraints:
                      const BoxConstraints(maxHeight: 100.0, maxWidth: 100.0),
                  // constraints: const BoxConstraints.expand(width: 100,height: 100),
                  child: Container(
                    width: 50.0,
                    height: 200.0,
                    color: Colors.blue,
                  )),
            )));
  }
}
